//
//  UIImageView+extension.swift
//  XLProject
//
//  Created by  on 2022/2/22.
//

import UIKit

extension UIImageView
{
    @objc func image(_ imgUrl:String, _ defaultImgName:String, _ localImgData:NSData?=nil
    )
    {
        if localImgData != nil && localImgData!.count > 0 {
            self.image =  UIImage(data:localImgData! as Data)
        }else{
            self.sd_setImage(with:URL(string:imgUrl), placeholderImage:UIImage(named:defaultImgName), options: .handleCookies, context: nil)

        }
    }
}
